<?php
/**
 * Created by PhpStorm.
 * User: xiaofang
 * Date: 2020/12/11
 * Time: 9:30
 */

namespace app\api\controller;


use think\Controller;
use think\Db;
use think\Exception;

class Truncate extends Controller
{
    public function lin_shi()
    {
        $sql = " truncate ny_linshi_data";

        try{
            Db::query($sql);
        }catch (Exception $exception){
            return json([
                "code"  =>  0,
                'msg'   => "error ".$exception->getMessage(),
                'data'  =>  [],
            ]);
        }

        return json([
            "code"  =>  0,
            'msg'   => "success ",
            'data'  =>  [],
        ]);
    }
}